<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 购物车 基类
 * @Entity
 * @Table(name="fa_cart", id={"id"})
 * @DDL("CREATE TABLE `fa_cart` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pro_id` int(10) DEFAULT NULL COMMENT '产品id',
  `specs_id` int(10) DEFAULT NULL COMMENT '规格id',
  `num` int(10) DEFAULT '1' COMMENT '数量',
  `uid` int(10) DEFAULT NULL COMMENT '用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='购物车'")
 * @property int $id 
 * @property int $proId 产品id
 * @property int $specsId 规格id
 * @property int $num 数量
 * @property int $uid 用户id
 */
abstract class CartBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 产品id
     * pro_id
     * @Column(name="pro_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $proId;

    /**
     * 获取 proId - 产品id
     *
     * @return int
     */ 
    public function getProId()
    {
        return $this->proId;
    }

    /**
     * 赋值 proId - 产品id
     * @param int $proId pro_id
     * @return static
     */ 
    public function setProId($proId)
    {
        $this->proId = $proId;
        return $this;
    }

    /**
     * 规格id
     * specs_id
     * @Column(name="specs_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $specsId;

    /**
     * 获取 specsId - 规格id
     *
     * @return int
     */ 
    public function getSpecsId()
    {
        return $this->specsId;
    }

    /**
     * 赋值 specsId - 规格id
     * @param int $specsId specs_id
     * @return static
     */ 
    public function setSpecsId($specsId)
    {
        $this->specsId = $specsId;
        return $this;
    }

    /**
     * 数量
     * num
     * @Column(name="num", type="int", length=10, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $num;

    /**
     * 获取 num - 数量
     *
     * @return int
     */ 
    public function getNum()
    {
        return $this->num;
    }

    /**
     * 赋值 num - 数量
     * @param int $num num
     * @return static
     */ 
    public function setNum($num)
    {
        $this->num = $num;
        return $this;
    }

    /**
     * 用户id
     * uid
     * @Column(name="uid", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $uid;

    /**
     * 获取 uid - 用户id
     *
     * @return int
     */ 
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * 赋值 uid - 用户id
     * @param int $uid uid
     * @return static
     */ 
    public function setUid($uid)
    {
        $this->uid = $uid;
        return $this;
    }

}
